<?php 
    defined('BASEPATH') OR exit('No direct script access allowed');
    class Model_Gender extends CI_Model
    {
        public function __construct() {
            parent::__construct();
            $this->load->database();
            $db_debug = $this->db->db_debug; //save setting
            $this->db->db_debug = FALSE;

            date_default_timezone_set('Asia/Phnom_Penh');
            $this->load->helper('date');
        }
        public function genderlist()
        {
            $this->db->select('id,name,note,active');
            $this->db->from('gender');
            $this->db->where('active', '1');
            $this->db->order_by("id", "asc");
            return $query=$this->db->get();
        }
		
        public function get($id)
        {
                $this->db->select('id,name,active');
                $this->db->from('gender');
                $this->db->where('id',$id);
                $query =$this->db->get();
                return $query->row_array();
        }
		
		
		
		
        
    }
    
?>